package com.mayikt.service;

import java.util.ServiceLoader;

/**
 * @ClassName Test002
 * @Author 蚂蚁课堂余胜军 QQ644064779 www.mayikt.com
 * @Version V1.0
 **/
public class Test002 {
    public static void main(String[] args) {
        Thread.currentThread().setContextClassLoader(Test002.class.getClassLoader()
                .getParent());
//        ClassLoader.getSystemClassLoader().loadClass("");
        ServiceLoader<MayiktMtService> load = ServiceLoader.load(MayiktMtService.class);
        load.forEach((t) -> {
            System.out.println(t);
        });
    }
}
